//
//  Extension+UIImageView.swift
//  HansWeibo
//
//  Created by Hans on 16/8/9.
//  Copyright © 2016年 Hans. All rights reserved.
//

import UIKit
import SDWebImage
extension UIImageView{
    //遍历构造函数
    convenience init(imageName: String){
        self.init(image: UIImage(named: imageName))
        
    }
    
    
    
    // 对SDWebImage 封装
    func HZsetImageWithString(imageName: String? ,placeholderImageName: String){
        
        self.sd_setImageWithURL(NSURL(string:imageName ?? "" ), placeholderImage: UIImage(named: placeholderImageName))
    }
    
}